package cn.b.sky.admin.dao;

import cn.b.sky.admin.model.Factory;
import cn.b.sky.admin.model.condition.FactoryCondition;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 
 * <strong>Title : FactoryDao.java<br></strong>
 * <strong>Package : cn.b.sky.admin.dao<br></strong>
 * <strong>Description : </strong>工厂持久层借口<br> 
 * <strong>Create on : 2016年6月12日 上午11:04:22<br></strong>
 * <p>
 * @author Yantao.Lu<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人|修改日期|修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public interface FactoryDao {

  public List<Factory> selectAllFactories();

  public List<Factory> selectFactoryListByCondition(FactoryCondition condition);

  public int selectFactoryCountByCondition(FactoryCondition condition);

  public void insertFactory(Factory factory);

  public void updateFactory(Factory factory);

  public Factory selectFactory(String siteCode);

  public void deleteFactory(String siteCode);

  public Set<String> getTableColumns(String tableName);

  public void insertFactoryData(@Param("tableName") String tableName, @Param("column") String columnName,
                                @Param("columns") Set<String> columns, @Param("sourceSiteCode") String sourceSiteCode,
                                @Param("targetSiteCode") String targetSiteCode);

  public void deleteFactoryData(@Param("tableName") String tableName, @Param("column") String columnName,
                                @Param("siteCode") String siteCode);

  public void updateAdminPassword(@Param("siteCode") String siteCode, @Param("password") String password);

}
